﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AsyncDemo.Model
{
    public class Person
    {
        [Key]
        public int Id { get; set; }

        [Required]
        public string Name { get; set; }

        /// <summary>
        /// 批注指定属性的对齐方式
        /// </summary>
        [InverseProperty("CreatedBy")]
        public List<Post> PostsWritten { get; set; }

        /// <summary>
        /// 批注指定属性的对齐方式
        /// </summary>
        [InverseProperty("UpdatedBy")]
        public List<Post> PostsUpdated { get; set; }
    }
}
